package com.koron.device.bean;

import com.alibaba.excel.annotation.ExcelProperty;
import com.koron.bean.base.BaseBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import java.util.List;


@Data
@ApiModel(value = "备品备件", description = "备品备件")
@EqualsAndHashCode
public class EquipmentBackup extends BaseBean{

    @ApiModelProperty(value = "唯一id")
    private String id;

    @ExcelProperty(value = "备件编号",index = 0)
    @NotBlank(message = "备件编号不能为空")
    @ApiModelProperty(value = "备件编号")
    private String code;

    @ExcelProperty(value = "备件名称",index = 1)
    @NotBlank(message = "备件名称不能为空")
    @ApiModelProperty("备件名称")
    private String name;

    @ExcelProperty(value = "型号规格",index = 9)
    @NotBlank(message = "备件型号不能为空")
    @ApiModelProperty("备件型号")
    private String type;

    @ApiModelProperty("备件分类")
    private String classifyId;

    @ApiModelProperty("备件当前对应的分类id的名称")
    private String classifyName;

    @javax.persistence.Transient
    @ApiModelProperty("适用设备")
    private List<EquipmentApply> backApply;

//    @ApiModelProperty("适用设备String类型")
//    private String backApplyStr;

    @ExcelProperty(value = "数量",index = 4)
    @ApiModelProperty(value = "备件数量")
    @NotBlank(message = "备件数量不能为空")
    private int amount;

    @ExcelProperty(value = "单位",index = 5)
    @ApiModelProperty(value = "计量单位")
    @NotBlank(message = "计量单位不能为空")
    private String unit;

    @ApiModelProperty(value = "数据来源")
    private String origin;

    @ApiModelProperty(value = "状态 0.草稿1.已启用2.已禁用")
    private String status;

    @ApiModelProperty(value = "是否绑定设备")
    private String isBind;

    @ApiModelProperty(value = "设备名称(列表展示)")
    private String eqName;

    @ApiModelProperty(value = "设备路径(列表展示)")
    private String fullPathName;

    @ApiModelProperty(value = "绑定id(用于解绑)")
    private String bindId;

    @ExcelProperty(value = "安装位置",index = 2)
    @ApiModelProperty(value = "安装位置")
    private String location;

    @ExcelProperty(value = "是否备件",index = 3)
    @ApiModelProperty(value = "是否备件")
    private String isPart;

    @ExcelProperty(value = "采购单价",index = 6)
    @ApiModelProperty(value = "采购单价")
    private String unitPrice;

    @ExcelProperty(value = "采购总价",index = 7)
    @ApiModelProperty(value = "采购总价")
    private String totalPrice;

    @ExcelProperty(value = "品牌或供应商",index = 8)
    @ApiModelProperty(value = "品牌")
    private String brand;

    @ExcelProperty(value = "所属合同",index = 10)
    @ApiModelProperty(value = "合同名称")
    private String contractName;

    @ApiModelProperty(value = "合同编号")
    private String contractCode;
}
